\(\int x (a+b \arctan (\frac {c}{x})) \, dx\) [134]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [C] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 39 \[ \int x \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {b c x}{2}+\frac {1}{2} x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right )-\frac {1}{2} b c^2 \arctan \left (\frac {x}{c}\right ) \]

[Out]

1/2*b*c*x+1/2*x^2*(a+b*arctan(c/x))-1/2*b*c^2*arctan(x/c)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4946, 199, 327, 209} \[ \int x \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {1}{2} x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right )-\frac {1}{2} b c^2 \arctan \left (\frac {x}{c}\right )+\frac {b c x}{2} \]

[In]

Int[x*(a + b*ArcTan[c/x]),x]

[Out]

(b*c*x)/2 + (x^2*(a + b*ArcTan[c/x]))/2 - (b*c^2*ArcTan[x/c])/2

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right )+\frac {1}{2} (b c) \int \frac {1}{1+\frac {c^2}{x^2}} \, dx \\ & = \frac {1}{2} x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right )+\frac {1}{2} (b c) \int \frac {x^2}{c^2+x^2} \, dx \\ & = \frac {b c x}{2}+\frac {1}{2} x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right )-\frac {1}{2} \left (b c^3\right ) \int \frac {1}{c^2+x^2} \, dx \\ & = \frac {b c x}{2}+\frac {1}{2} x^2 \left (a+b \arctan \left (\frac {c}{x}\right )\right )-\frac {1}{2} b c^2 \arctan \left (\frac {x}{c}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.13 \[ \int x \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {b c x}{2}+\frac {a x^2}{2}+\frac {1}{2} b c^2 \arctan \left (\frac {c}{x}\right )+\frac {1}{2} b x^2 \arctan \left (\frac {c}{x}\right ) \]

[In]

Integrate[x*(a + b*ArcTan[c/x]),x]

[Out]

(b*c*x)/2 + (a*x^2)/2 + (b*c^2*ArcTan[c/x])/2 + (b*x^2*ArcTan[c/x])/2

Maple [A] (verified)

Time = 1.25 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.95

method result size
parts \(\frac {a \,x^{2}}{2}+\frac {\arctan \left (\frac {c}{x}\right ) b \,x^{2}}{2}-\frac {b \,c^{2} \arctan \left (\frac {x}{c}\right )}{2}+\frac {x b c}{2}\) \(37\)
parallelrisch \(\frac {\arctan \left (\frac {c}{x}\right ) b \,x^{2}}{2}+\frac {\arctan \left (\frac {c}{x}\right ) b \,c^{2}}{2}+\frac {a \,x^{2}}{2}+\frac {x b c}{2}-\frac {a \,c^{2}}{2}\) \(43\)
derivativedivides \(-c^{2} \left (-\frac {a \,x^{2}}{2 c^{2}}+b \left (-\frac {x^{2} \arctan \left (\frac {c}{x}\right )}{2 c^{2}}-\frac {x}{2 c}-\frac {\arctan \left (\frac {c}{x}\right )}{2}\right )\right )\) \(47\)
default \(-c^{2} \left (-\frac {a \,x^{2}}{2 c^{2}}+b \left (-\frac {x^{2} \arctan \left (\frac {c}{x}\right )}{2 c^{2}}-\frac {x}{2 c}-\frac {\arctan \left (\frac {c}{x}\right )}{2}\right )\right )\) \(47\)
risch \(\text {Expression too large to display}\) \(688\)

[In]

int(x*(a+b*arctan(c/x)),x,method=_RETURNVERBOSE)

[Out]

1/2*a*x^2+1/2*arctan(c/x)*b*x^2-1/2*b*c^2*arctan(x/c)+1/2*x*b*c

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.79 \[ \int x \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {1}{2} \, b c x + \frac {1}{2} \, a x^{2} + \frac {1}{2} \, {\left (b c^{2} + b x^{2}\right )} \arctan \left (\frac {c}{x}\right ) \]

[In]

integrate(x*(a+b*arctan(c/x)),x, algorithm="fricas")

[Out]

1/2*b*c*x + 1/2*a*x^2 + 1/2*(b*c^2 + b*x^2)*arctan(c/x)

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int x \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {a x^{2}}{2} + \frac {b c^{2} \operatorname {atan}{\left (\frac {c}{x} \right )}}{2} + \frac {b c x}{2} + \frac {b x^{2} \operatorname {atan}{\left (\frac {c}{x} \right )}}{2} \]

[In]

integrate(x*(a+b*atan(c/x)),x)

[Out]

a*x**2/2 + b*c**2*atan(c/x)/2 + b*c*x/2 + b*x**2*atan(c/x)/2

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int x \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {1}{2} \, a x^{2} + \frac {1}{2} \, {\left (x^{2} \arctan \left (\frac {c}{x}\right ) - {\left (c \arctan \left (\frac {x}{c}\right ) - x\right )} c\right )} b \]

[In]

integrate(x*(a+b*arctan(c/x)),x, algorithm="maxima")

[Out]

1/2*a*x^2 + 1/2*(x^2*arctan(c/x) - (c*arctan(x/c) - x)*c)*b

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.27 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.85 \[ \int x \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {{\left (2 \, b c^{3} \arctan \left (\frac {c}{x}\right ) - \frac {i \, b c^{5} \log \left (\frac {i \, c}{x} + 1\right )}{x^{2}} + \frac {i \, b c^{5} \log \left (-\frac {i \, c}{x} + 1\right )}{x^{2}} + 2 \, a c^{3} + \frac {2 \, b c^{4}}{x}\right )} x^{2}}{4 \, c^{3}} \]

[In]

integrate(x*(a+b*arctan(c/x)),x, algorithm="giac")

[Out]

1/4*(2*b*c^3*arctan(c/x) - I*b*c^5*log(I*c/x + 1)/x^2 + I*b*c^5*log(-I*c/x + 1)/x^2 + 2*a*c^3 + 2*b*c^4/x)*x^2
/c^3

Mupad [B] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int x \left (a+b \arctan \left (\frac {c}{x}\right )\right ) \, dx=\frac {a\,x^2}{2}+\frac {b\,c^2\,\mathrm {atan}\left (\frac {c}{x}\right )}{2}+\frac {b\,x^2\,\mathrm {atan}\left (\frac {c}{x}\right )}{2}+\frac {b\,c\,x}{2} \]

[In]

int(x*(a + b*atan(c/x)),x)

[Out]

(a*x^2)/2 + (b*c^2*atan(c/x))/2 + (b*x^2*atan(c/x))/2 + (b*c*x)/2